項目管理API
獲取項目列表
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| page_size | Integer | Body | 是 | 每頁數量 |
| page_index | Integer | Body | 是 | 當前頁數 |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | []Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| project_id | String | Body | 項目ID |
| project_name | String | Body | 項目名稱 |
請求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_project_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"page_size": 1,
"page_index": 1
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"project_id": "pfa332e258aae1badbb27d31128f442d1",
"project_name": "test"
}
]
}
失敗返回示例
見 接口失敗返回
獲取項目信息
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 項目ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| project_name | String | Body | 項目名稱 |
請求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_project_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"project_id": "p31adc223cc4b3bedb6bd4742dedcfa52"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"project_name": "test"
}
}
失敗返回示例
見 接口失敗返回
獲取樓棟列表
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 項目ID |
| page_size | Integer | Body | 是 | 每頁數量 |
| page_index | Integer | Body | 是 | 當前頁數 |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | []Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| building_id | String | Body | 樓棟ID |
| building_name | String | Body | 樓棟名稱 |
請求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_building_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"project_id": "p31adc223cc4b3bedb6bd4742dedcfa52",
"page_size": 1,
"page_index": 1
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"building_id": "bfa332e258aae1badbb27d31128f442d6",
"building_name": "test"
}
]
}
失敗返回示例
見 接口失敗返回
獲取樓棟信息
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 項目ID |
| building_id | String | Body | 是 | 樓棟ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| building_name | String | Body | 樓棟名稱 |
請求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_building_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"project_id": "p31adc223cc4b3bedb6bd4742dedcfa52",
"building_id": "b53adc223cc4b3bedb6bd4742dedcfa54"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"building_name": "test"
}
}
失敗返回示例
見 接口失敗返回
獲取導入結果
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 項目ID |
| import_type | String | Body | 是 | 導入類型 user_info:用戶信息 user_pin_code_and_rf_card_access_info:用戶PIN碼與射頻卡權限信息 user_face_access_info:用戶人臉權限信息 staff_access_info:員工權限信息 |
| task_id | String | Body | 是 | 任務ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| created_time | String | Body | 創建時間,UTC |
| file_name | String | Body | 文件名稱 |
| import_process | Integer | Body | 導入進度(%) |
| failure_count | Integer | Body | 失敗數量 |
| is_resolved | Boolean | Body | 判斷任務是否解決 true:已解決 false:未解決 |
| import_status | String | Body | 導入狀態 not_resolved:未處理 success:成功 partial_failure:部分失敗 importing:導入中 failure:失敗 |
請求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_import_result",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"project_id": "p31adc223cc4b3bedb6bd4742dedcfa52",
"import_type": "user_info",
"task_id": "tpr31adc223cc4b3bedb6bd4742dedcfa"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"created_time": "2024-07-23 17:12:53",
"file_name": "test",
"import_process": 100,
"failure_count": 0,
"is_resolved": true,
"import_status": "success"
}
}
失敗返回示例
見 接口失敗返回